Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Score documents widget #632

Merged
merged 8 commits into from
Apr 30, 2021
Merged

Conversation

PrimozGodec
Copy link
Collaborator

@PrimozGodec PrimozGodec commented Mar 18, 2021

Issue

Implements #631

Description of changes

Score documents widget

Includes
  • Code changes
  • Tests
  • Documentation

@PrimozGodec PrimozGodec marked this pull request as draft March 18, 2021 11:03
@PrimozGodec
Copy link
Collaborator Author

Here is the workflow to test the widget
score-documents.ows.zip

@ajdapretnar
Copy link
Collaborator

The widget currently doesn't output anything. Probably, it should output a table with scores? :)
I would also add tooltips to methods, i.e.:
Word frequency: "Relative frequency of the word in the document."
Word ratio: "Percentage of words in the document (Jaccard index)."
Embedding similarity: "Cosine distance between the document and the word."

@PrimozGodec
Copy link
Collaborator Author

PrimozGodec commented Apr 14, 2021

Today at the meeting we decided to change the following:

  • Add filter to the top of table view
  • Change the design of the table to match the one in the Keywords widget (and also Data Table)
  • Document column should not break into more lines. Truncate longer titles instead
  • Rename Embedding similarity to Similarity
  • Add tooltip to options in the control area

@codecov-io
Copy link

codecov-io commented Apr 14, 2021

Codecov Report

Merging #632 (89f76ed) into master (4c4069b) will increase coverage by 0.67%.
The diff coverage is 91.50%.

@@            Coverage Diff             @@
##           master     #632      +/-   ##
==========================================
+ Coverage   71.29%   71.97%   +0.67%     
==========================================
  Files          66       70       +4     
  Lines        7806     8634     +828     
  Branches     1027     1156     +129     
==========================================
+ Hits         5565     6214     +649     
- Misses       2038     2203     +165     
- Partials      203      217      +14     

@PrimozGodec PrimozGodec force-pushed the scorer-widget branch 6 times, most recently from 816dfe0 to d7fe564 Compare April 16, 2021 12:35
@PrimozGodec PrimozGodec marked this pull request as ready for review April 16, 2021 12:35
requirements.txt Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #632 (fc13aca) into master (f2d7b44) will increase coverage by 0.63%.
The diff coverage is 96.59%.

❗ Current head fc13aca differs from pull request most recent head 757d0b1. Consider uploading reports for the commit 757d0b1 to get more accurate results

@@            Coverage Diff             @@
##           master     #632      +/-   ##
==========================================
+ Coverage   73.37%   74.01%   +0.63%     
==========================================
  Files          70       71       +1     
  Lines        8898     9159     +261     
  Branches     1191     1238      +47     
==========================================
+ Hits         6529     6779     +250     
- Misses       2137     2144       +7     
- Partials      232      236       +4     

box,
self,
"aggregation",
searchable=True,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I woudl not make the combo searchable for only four items.

callback=self.__setting_changed,
)

box = gui.widgetBox(self.controlArea, "Aggregate scores")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Aggregate scores" -> "Aggregation" to make it consistent with the Extract Keywords widget

@VesnaT
Copy link
Contributor

VesnaT commented Apr 30, 2021

One can select rows in the table, but the selection is not reflected in the output.
If the selection should be considered, maybe a Select Documents box could be added to the widgets control area.

@VesnaT VesnaT merged commit f78144f into biolab:master Apr 30, 2021
@PrimozGodec PrimozGodec deleted the scorer-widget branch March 29, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants